<!-- 关注组件 -->
<template>
  <div class="follow_warpper">
    <div class="left_img_wrap cursor_class">
      <img :src="item.avatarUrl" alt="" @click="router.push('/user-home/' + item.userId)">
    </div>
    <div class="right_info_wrap">
      <div class="left_info">
        <div class="name">
          <el-button link type="primary" @click="router.push('/user-home/' + item.userId)">{{ item.nickname }}</el-button>
          <div class="sex_img">
            <img src="@/assets/images/man.png" alt="" v-if="item.gender === 1">
            <img src="@/assets/images/woman.png" alt="" v-if="item.gender === 2">
          </div>
        </div>
        <div class="esb_wrap">
          <div class="esb_item cursor_class">
            <el-button link @click="router.push('/user-home/' + item.userId)">动态{{ item.eventCount }}</el-button>
          </div>
          <div class="esb_item">
            <el-button link @click="router.push(`/user-home/${item.userId}?activeName=second`)">关注{{ item.follows }}</el-button>
          </div>
          <div class="esb_item">
            <el-button link @click="router.push(`/user-home/${item.userId}?activeName=third`)">粉丝{{ item.followeds }}</el-button>
          </div>
        </div>
        <div class="desc text_ellipsis">
          {{ item.signature }}
        </div>
      </div>
      <!-- <div class="right_opeat">
        <div class="top_button">
          <el-button :icon="Promotion">发私信</el-button>
        </div>
        <div class="bottom_op_status">
          <el-icon :size="16"><Check /></el-icon>已关注
        </div>
      </div> -->
    </div>
  </div>
</template>
<script lang="ts" setup>
import { Promotion, Check } from '@element-plus/icons-vue'
import { reactive, ref, toRefs } from "vue"
import { useRouter } from 'vue-router'
const router = useRouter()
const props = defineProps({
  item: Object,
  default:() => {
    return {}
  }
})
const { item } = toRefs(props)
</script>
<style lang="scss" scoped>
.follow_warpper {
  display: flex;
  align-items: center;

  .left_img_wrap {
    width: 60px;
    height: 60px;

    img {
      width: 100%;
      height: 100%;
      object-fit: cover;
    }
  }

  .right_info_wrap {
    display: flex;
    padding: 0 10px;
    flex: 1;
    justify-content: space-between;
    overflow: hidden;
    .left_info {
      overflow: hidden;
      padding: 0 8px;
      .name {
        display: flex;
        align-items: center;

        .sex_img {
          width: 20px;

          img {
            width: 14px;
          }
        }
      }

      .esb_wrap {
        display: flex;
        align-items: center;
        margin: 0px 0 8px;
        overflow: hidden;
        .esb_item {
          border-right: 1px solid #ddd;
          padding: 0 15px;

          button {
            font-size: 12px;
          }

          &:first-child {
            padding-left: 0;
          }

          &:last-child {
            border-right: 0;
          }
        }
      }

      .desc {
        color: #666;
        font-size: 12px;
      }
    }

    .right_opeat {
      display: flex;
      flex-direction: column;
      // justify-content: center
      align-items: center;

      .top_button {
        margin-bottom: 10px;
      }

      .bottom_op_status {
        display: flex;
        align-items: center;
        font-size: 12px;
        color: #999;
      }
    }
  }
}
</style>
